Technical Q&A QD32
Printing Finder Icons


Q: In writing a print driver, I've noticed that when I print a window from the Finder, the icons don't show up. What gives?

A: What you've uncovered is an "optimization" in the Icon Utilities. When drawing an icon, rather than going through the standard bottlenecks, the Icon Utilities use CopyMask. This is true unless you're saving to a pict or drawing to a port they recognize as a printing port (by the print driver setting a low-memory global, which is underdocumented).

The following two macros tell the Icon Utilities to use CopyBits instead of using CopyMask. Call setPrinting in your PrOpenPage function and call clearPrinting in your PrClosePage function, and all should be well.

#define setPrinting {*((short *)0x948) = 0;}
#define clearPrinting {*((short *)0x948) = -1;}

[Nov 01 1995]


Developer Documentation | Technical Notes | Development Kits | Sample Code